//
//  TYZBaseTableViewDataSource.h
//  DriveSchoolCoach
//
//  Created by TangBin on 2019/7/4.
//  Copyright © 2019 TangBin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface TYZBaseTableViewDataSource : NSObject <UITableViewDelegate, UITableViewDataSource>


@property (nonatomic, strong) NSMutableArray *dataList;

/**
 获取cell
 */
@property (nonatomic, copy) UITableViewCell *(^cellForRowAtIndexPathBlock)(UITableView *tableView, _Nullable id model, NSIndexPath *indexPath);


/**
 得到cell的高度
 */
@property (nonatomic, copy) CGFloat(^heightForRowAtIndexPathBlock)(UITableView *tableView, id model, NSIndexPath *indexPath);

/**
 header视图
 */
@property (nonatomic, copy) UIView *(^viewForHeaderInSectionBlock)(UITableView *tableView, NSInteger section);

/**
 footer 的高度
 */
@property (nonatomic, copy) CGFloat(^heightForFooterInSectionBlock)(UITableView *tableView, NSInteger section);

/**
 footer视图
 */
@property (nonatomic, copy) UIView *(^viewForFooterInSectionBlock)(UITableView *tableView, NSInteger section);

/**
 点击调用
 */
@property (nonatomic, copy) void(^didSelectRowAtIndexPathBlock)(UITableView *tableView, id model, NSIndexPath *indexPath);

@end

NS_ASSUME_NONNULL_END
